﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Janus.Windows.GridEX;

namespace YiLe.UI
{
    public partial class frmFilter : Form
    {
        public DialogResult ShowDialog(GridEX grid, Form parent)
        {

            this.FilterEditor1.SourceControl = grid;
            this.ShowDialog(parent);
            if (this.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                grid.RootTable.FilterCondition = (IFilterCondition)this.FilterEditor1.FilterCondition;
            }
            return this.DialogResult;
        }

        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);
            //TODO:VisualStyleManager1.AddControl();
            //YiLeSystemApp.MainForm.VisualStyleManager1.AddControl(this, true);
        }
    }
}
